package com.kunlong;

import com.alibaba.druid.filter.config.ConfigTools;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Configuration;

import java.util.TimeZone;

@Configuration
@SpringBootApplication(scanBasePackages = {"com.kunlong"})
public class CodegenApp {
    //java -cp druid-1.1.20.jar com.alibaba.druid.filter.config.ConfigTools root

      public static void main(String[] args) throws Exception {
          TimeZone timeZone = TimeZone.getTimeZone("GMT+8");
          TimeZone.setDefault(timeZone);

          SpringApplication.run(new Class[]{CodegenApp.class}, args);
          String password = "root";
          String result = ConfigTools.encrypt(password);
          System.out.println(result);
          //System.out.println(ConfigTools.decrypt(result));


      }
}
